package com.example.demo.model.dto;

import lombok.Data;
import org.flowable.task.api.Task;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * Description:
 * <p>
 * Copyright: 天津联想协同科技有限公司
 * <p>
 *
 * @author anlu
 * @date 2025/10/17 17:12
 */

@Data
public class TaskDTO {
    private String id;
    private String name;
    private String assignee;
    private Date created;


    public  TaskDTO  convert(Task task) {
        TaskDTO taskDTO = new TaskDTO();
        taskDTO.setId(task.getId());
        taskDTO.setName(task.getName());
        taskDTO.setAssignee(task.getAssignee());
        taskDTO.setCreated(task.getCreateTime());
        return taskDTO;
    }
}
